home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 11 / PC World Interactive 11.iso / share / multimed / MAINACT / DATA1.CAB / Script_Files / renframs.rex < prev    next >
OS/2 REXX Batch file  |  1998-05-04  |  2KB  |  33 lines

  1. /**************************************************************
  2.  *                                                            *
  3.  *                   MainActor Rexx Script                    *
  4.  *                                                            *
  5.  *  Renames a frame list created by MainActor to a specific   *
  6.  *  file name format.                                         *
  7.  *                                                            *
  8.  *  Last modified: 09/06/97, Written by: Markus Moenig        *
  9.  *                                                            *
  10.  **************************************************************/
  11.  
  12.  
  13.   SetInfoText("Renaming frames ...")
  14.  
  15.   sourcebase="c:\tmp\test" /* Source is of the format: "c:\tmp\testXXXX.tga */
  16.   destbase="c:\test"     
  17.   format="tga"             /* This example renames to "c:\test.XXX */
  18.   numberofframes=40        /* Convert 40 frames */
  19.  
  20.                            /* It should be fairly easy to change this to */
  21.                            /* any special format */  
  22.  
  23.   i=1
  24.   DO WHILE i <= numberofframes
  25.     oldname=sourcebase || Right( "0000" || i, 4) || "." || format
  26.     newname=destbase || "." || Right( "000" || i, 3)
  27.                            /* If you need more than three digits, use */
  28.                            /* for example Right( "0000" || i, 4) which */
  29.                            /* converts to c:\test.XXXX */
  30.     say "Renaming:" oldname "to" newname
  31.     DOSRENAME( oldname, newname)
  32.     i=i+1
  33.   END